<template>
  <div>
    <custom-form
      :columns="columns"
      :rules="rules"
      v-bind="$attrs"
      v-on="listeners"
    >
    </custom-form>
  </div>

</template>

<script>
import customFromMixin from '@/utils/mixin/custom-form'

export default {
  name: 'AddForm',
  mixins: [customFromMixin],
  data() {
    return {
      rules: {},
      // 列配置
      columns: [
        { name: '名称', field: 'name', opts: { required: true, maxlength: 50 } },
        { name: 'IMEI', field: 'IMEI', opts: { required: true, maxlength: 50 } },
        {
          name: '巡检内容',
          field: 'type_id',
          opts: {
            control: 'pollingType',
            name: 'name',
            required: true,
            reload: true,
            field: 'id'
          },
          type: 'select_table'
        },
        { name: '巡检频率', field: 'mode', type: 'number', opts: { required: true } },
        { name: '周期', field: 'date_type', label: true, type: 'radio', opts: { required: true }, edit_opts: { required: false } },
        // { name: '状态', field: 'status', label: true, type: 'radio', opts: { required: true } },
        { name: '备注', field: 'mark', type: 'textarea', opts: { maxlength: 120 } }
      ]
    }
  },
  watch: {},
  created() {

  },
  mounted() {
    // var that = this
    // that.onLoad()
  },
  methods: {
    // onLoad() {
    //   console.log('我被触发了')
    // }
  }
}
</script>

<style scoped>

</style>
